package com.city.repository.pub;


import com.city.domain.pub.PubKeyTrajectory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @deprecation: 某表中对应记录的轨迹信息
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-26 12:46
 */
@Repository
public interface PubKeyTrajectoryRepository extends JpaRepository<PubKeyTrajectory,Integer> {
    @Query(value = "select * from pub_key_trajectory where table_name=?1 and id_index=?2 limit ?3,?4", nativeQuery = true)
    List<PubKeyTrajectory> getPubKeyTrajectoryLimit(String tableName, String idIndex, Integer limitPage, Integer limitNum);

    @Query(value = "select * from pub_key_trajectory where table_name=?1 and id_index=?2  group by update_time", nativeQuery = true)
    List<PubKeyTrajectory> getAll(String tableName, String idIndex);
}
